﻿using LPLS.Commons.DBModule;
using LPLS.Commons.Enums;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LPLS.DBEntities.OEEModule.OEEModels.DataStatisticModels
{

    [DatabaseKey(DatabaseEnum.CollectionDataResult)]
    [SugarTable(nameof(DeviceDataStatistic))]
    /// <summary>
    /// 设备整体的数据统计模型  用于设备的数据统计分析  注意改模型前提是设备数据采集已经完成 有中间模块对数据进行了数据结果处理
    /// </summary>
    public class DeviceDataStatistic
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int ID { get; set; }
        
        public Guid  DeviceID { get; set; }
        [SugarColumn(IsIgnore =true)]
        public string DeviceName { get; set; }
        /// <summary>
        /// 设备状态
        /// </summary>
        public StatusEnum Status { get; set; }
        [SugarColumn(IsIgnore =true)]
        public string DeviceStatusDesc { get; set; }
        public DateTime StartTime { get; set; }
        public DateTime EndTime { get; set; }
        /// <summary>
        /// 持续时间
        /// </summary>
        public int TotalSecondTime { get; set; }

        [SugarColumn(IsNullable = true)]
        public string AlarmCode { get; set; } = "";

      



    }
}
